
//import java.net.InetAddress;
//import java.net.UnknownHostException;

public class Tester {

    public static void main(String[] args) {

	MacAddress address1 = new MacAddress();

	byte[] testAddress = {127, -128, -128, -112, 0, 0};
	MacAddress address2 = new MacAddress(testAddress);

	System.out.println("[address1]  " + address1.toString());
	System.out.println("[address2]  " + address2.toString());

	System.out.println("[compareTo] " + address1.compareTo(address2));
	System.out.println("[equals]    " + address2.equals(address1));

	try {
	    short id = 15;
	    boolean doNotFragment = true;
	    boolean moreBits = true;
	    short fragmentOffset = 701;
	    int timeToLive = IPv4Datagram.INITIALIZE_TTL;
	    boolean decrementTTL = false;
	    MacAddress sourceIp = address2;
	    MacAddress destinationIp = address1;
	    byte[] payload = {111, 111, 111, 111, 111, 111, 111, 111};
	    
	    IPv4Datagram gram = new IPv4Datagram(id, doNotFragment, moreBits,
		    fragmentOffset, timeToLive, decrementTTL, sourceIp, destinationIp, payload);
	    System.out.println("[IPDatagram] " + gram.toString());
	    
	} catch (InstantiationException e) {
	    e.printStackTrace();
	}

	//	try {
	//	    System.out.println(InetAddress.getLocalHost());
	//	} catch (UnknownHostException e) {
	//	    // TODO Auto-generated catch block
	//	    e.printStackTrace();
	//	}
    }

}